package com.attendance.chdingtask.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @创建人 Mr.Bu
 * @创建时间 $
 * @描述
 */
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Data
@Table(name="data_list")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@ApiModel(description = "打卡记录表")
@EntityListeners(AuditingEntityListener.class)
public class DataList  implements Serializable {

    private static final long serialVersionUID = 2517645348626178649L;
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @ApiModelProperty(value = "主键")
    private Long id;


    @ApiModelProperty(value = "用户主键")
    private String userid;

    @ApiModelProperty(value = "打卡位置")
    private String address;
    @ApiModelProperty(value = "打卡时间")
    private Date checkTime;
    @ApiModelProperty(value = "企业id")
    private String corpId;
    @ApiModelProperty(value = "考勤组id")
    private String groupId;

    @ApiModelProperty(value = "纬度信息")
    private String latitude;

    @ApiModelProperty(value = "经度信息")
    private String longitude;

    @ApiModelProperty(value = "业务id")
    private String bizId;

    @ApiModelProperty(value = "打卡方式。MAP表示定位打卡，WIFI表示wifi打卡")
    private String locationMethod;



    /**
     * 创建时间
     */
    @CreatedDate
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @LastModifiedDate
    @Column(name = "modify_time")
    private Date modifyTime;

}
